
public class javademo {
    public static void main(String[] args) {
        outer outer1=new outer();
        outer.inter inter1=new outer().new inter();
        outer.inter inter2=outer1.new inter();
        inter1.method();
        inter2.method();

    }
}

class outer{
    public String name="外部类name成员";
    private String sex;
    public static int age;
    public void outmethod(){
        System.out.println("这是外部类中的一个成员方法");
    }

    public static class inter{
        public String name="内部类name成员";
        public int L;
        public int M;
        public int S;

        public static void fun(){
            outer out1=new outer();
            System.out.println(out1.sex);
        }


            outer out2=new outer();
        String name1=out2.name;
            //System.out.print(out2.sex);



        /*public  void method(){
            System.out.println("这是内部类中的一个成员方法");
            System.out.println(outer.this.name);
        }*/

    }

    public void outtest(){

    }
}